package com.nf.teamwork.mall.service.impl;

import com.nf.teamwork.mall.dao.ProductCategoryDao;
import com.nf.teamwork.mall.entity.ProductCategory;
import com.nf.teamwork.mall.service.ProductCategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author: ZJ
 * @Classname ProductCategoryServiceImpl
 * @Date: 2020-2-27 15:15:49
 * @Description: 商品类型表service层
 */
@Service
public class ProductCategoryServiceImpl implements ProductCategoryService {

    @Autowired
    private ProductCategoryDao productCategoryDao;

    @Override
    public List<ProductCategory> findAll() {
        return productCategoryDao.findAll();
    }

    @Override
    public List<ProductCategory> getProductCategoriesByParentId(int parentId) {
        return productCategoryDao.getProductCategoriesByParentId(parentId);
    }

    @Override
    public List<ProductCategory> getProductCategoriesByProductCategoryId(int productCategoryId) {
        return productCategoryDao.getProductCategoriesByProductCategoryId(productCategoryId);
    }
}
